home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 2 / BBS in a box - Trilogy II.iso / Files / Hyper / Ss-Sz / Stack Starter ß.979 / Stack Starter fl.979 / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1989-07-29  |  28.0 KB  |  16 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.979</name>
  5.     <id>-1</id>
  6.     <cardCount>33</cardCount>
  7.     <cardID>4644</cardID>
  8.     <listID>13406</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû Script info for this stack. ‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
  17. HANDLERS: doMenu,idle,startUp,resume,openStack,closeStack,suspend,
  18. --        attend,author,backToChicago,bkgndScript,btnScript,
  19. --        bomb,Bye,cardScript,changeFont,closeCard,
  20. --        closing,congrat,crash,credits,curse,cursors,danger,
  21. --        dedications,deleteButton,deleteField,deprotect1,
  22. --        ding,diskSpaceAvail,egress,enterKey,Eye,fieldScript,
  23. --        freeSpace,FreeSpaceMon,FreeSpaceMon1,getready,
  24. --        getSpecs,getSpecsFirst,getWithIt,goodbye,heapSpaceAvail,
  25. --        help,hideall,hideSome,home,homeScript,HyperCardVersion,
  26. --        HyperEditOn,HyperEditOff,index,iconCheck,info,
  27. --        installHomeCardIcon,intro,introInterupt,LNPC,lock,
  28. --        lockcard,makeMenus,map,mouseEnter,mouseLocation,
  29. --        mouseUp,mouseStillDown,mouseWithIn,newbutton,newfield,
  30. --        Ninja,openApl,openCard,openField,closeField,overLoad,
  31. --        panic,pause,piGrid,scroll,ScriptHeader,ShowHiddenBtns,
  32. --        ShowHiddenFields,SizeofStack,skull,stackScript,
  33. --        stackSpaceAvail,StartDown,OsErr,test,timeDate,updated,
  34. --        unlock,unlockcard,vacat,getLinNum,returnkey
  35.  
  36. FUNCTIONS: LineClicked
  37.  
  38. Size of script: 29488 chars.         8/16/88      Robertson Reed Smith
  39. ‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
  40.  
  41. on doMenu this
  42. global menu1, menu2
  43. if this is "Attention" then attend
  44. else if this is "Buttons" then go to card "the button breeder"
  45. else if this is "Cover" then go to card "the stack starter"
  46. else if this is "Controls" then go to card "the controls cultivator"
  47. else if this is "Congratulations" then congrat
  48. else if this is "Crash" then crash
  49. else if this is "Danger" then danger
  50. else if this is "Ding" then ding
  51. else if this is "Effects" then go to card "the effects editor"
  52. else if this is "Fields" then go to card "the field fabricater"
  53. else if this is "Gauges" then go to card "Gauges"
  54. else if this is "HyperEdit" then answer "Please, press the return Key and the shift Key"
  55. else if this is "HyperSound‚Ñ¢" then go to stack "HyperSound"
  56. else if this is "Icons" then go to card "the icon initiator"
  57. else if this is "Info" then info
  58. else if this is "Make Icons" then makeIcon
  59. else if this is "Map" then map
  60. else if this is "OverLoad" then overLoad
  61. else if this is "Panic" then panic
  62. else if this is "Pause" then pause
  63. else if this is "ResCopy" then ResCopy
  64. else if this is "ResEdit" then open "ResEdit 1.1B3"
  65. else if this is "Script of Bkgnd..." then bkgndScript
  66. else if this is "Script of Button..." then btnScript
  67. else if this is "Script of Card..." then cardScript
  68. else if this is "Script of Field..." then fieldScript
  69. else if this is "Script of Stack..." then stackScript
  70. else if this is "Script of Home" then HomeScript
  71. else if this is "Scripts" then answer "Sorry, This feature not yet supported"
  72. else if this is "SoundEdit‚Ñ¢" then open SoundEdit
  73. else if this is "Sounds" then go to card "the sound sampler"
  74. else if this is "Tools" then go to card "the allover analyzer"
  75. else if this is "Vacation" then Vacat
  76. else if this is "Open Stack..." then
  77. answer "Are you leaving this stack for good?"¬¨
  78. with "Yes" or "No" or "Cancel"
  79. if it is "No" then pass doMenu
  80. else if it is "Yes" then
  81. egress
  82. pass doMenu
  83. end if
  84. else if this is "Quit HyperCard" then
  85. answer "Quit HyperCard or Shutdown the Mac?"¬¨
  86. with "Restart" or "Shutdown" or "Quit"
  87. egress
  88. if it is "Restart" then
  89. doRestart
  90. exit doMenu
  91. else if it is "Shutdown" then shutdown
  92. else
  93. pass doMenu
  94. exit doMenu
  95. end if
  96. else pass doMenu
  97. hide msg
  98. end doMenu
  99.  
  100. on idle
  101. global menu1, menu2, lastTick
  102. --set userLevel to 5
  103. if (the ticks-lastTick)>120 then
  104. put the ticks into lastTick
  105. ShowMenu menu1
  106. ShowMenu menu2
  107. end if
  108. pass idle
  109. end idle
  110.  
  111. on startUp
  112. global CheckUp, SaveLevel, Start, UserLevel
  113. put the userLevel into SaveLevel
  114. set userLevel to 5
  115. set powerKeys to true
  116. SetVolume(7)
  117. hideSome
  118. if CheckUp <> empty then exit startUp
  119. hide menubar
  120. hide btn id 6
  121. getSpecsFirst
  122. unlock
  123. set hilite of btn id 2 to true
  124. put 1 into CheckUp
  125. unlock
  126. set the cursor to 4
  127. freeSpace
  128. set hilite of btn id 2 to false
  129. makeMenus
  130. set hilite of btn id 2 to true
  131. StartDown
  132. show btn id 6
  133. put empty into card field "Specs"
  134. if the optionKey <> down then intro
  135. visual effect dissolve
  136. go card 11
  137. show menuBar
  138. set cursor to 4
  139. lockcard
  140. push card
  141. get id of this bkgnd
  142. put "Looking for all the FONTS available to this stack."
  143. if it <> "2295" then go to bkgnd id 2295
  144. put Resources("FOND") into field "fontField"
  145. put SortLines( field "fontField", "A" ) into field "fontField"
  146. put crunch( field "fontField") into field "fontField"
  147. set script of field "fontField" to field "fontField"
  148. put "Looking for all the SOUNDS available to this stack."
  149. put Resources("snd ") into field "sndField"
  150. repeat with i = 1 to number of lines of field "sndField"
  151. put LowerToUpper(char 1 of line i of field "sndField")¬¨
  152. into char 1 of line i of field "sndField"
  153. end repeat
  154. put SortLines( field "sndField", "A" ) into field "sndField"
  155. put "Found them."
  156. put crunch( field "sndField") into field "sndField"
  157. set script of field "sndField" to field "sndField"
  158. unlock
  159. hide msg
  160. pop card
  161. idle
  162. end startUp
  163.  
  164. on resume
  165. set userLevel to 5
  166. set the cursor to 4
  167. makeMenus
  168. getWithIt
  169. idle
  170. end resume
  171.  
  172. on openStack
  173. global CheckUp
  174. if CheckUp <> empty then exit openStack
  175. get short name of card
  176. if it is "First" then startup
  177. else resume
  178. end openStack
  179.  
  180. on closeStack
  181. global CheckUp
  182. put empty into CheckUp
  183. closing
  184. pass closeStack
  185. end closeStack
  186.  
  187. on suspend
  188. global CheckUp
  189. put empty into CheckUp
  190. closing
  191. pass suspend
  192. end suspend
  193.  
  194. on attend
  195. push card
  196. lockcard
  197. set lockRecent to true
  198. go card "the box card"
  199. repeat with i = 1 to 5
  200. hide card field i
  201. end repeat
  202. hideAll
  203. show card field id 8
  204. set icon of btn id 1 to 6182
  205. unlockcard
  206. wait until the mouseClick
  207. play "Evil Laugh"
  208. lockcard
  209. hide card field id 8
  210. pop card
  211. show menuBar
  212. end attend
  213.  
  214. on author
  215. lockcard
  216. go card "the stack starter"
  217. send mouseUp to btn "Ego"
  218. end author
  219.  
  220. on backToChicago
  221. lockcard
  222. push card
  223. get id of this bkgnd
  224. if it <> "2295" then go to bkgnd id 2295
  225. send backToChicago to field "BS"
  226. pop card
  227. end backToChicago
  228.  
  229. on bkgndScript
  230. lockcard
  231. push card
  232. get id of this bkgnd
  233. if it <> "2295" then go to bkgnd id 2295
  234. send bkgndScript to field "BS"
  235. pop card
  236. end bkgndScript
  237.  
  238. on btnScript
  239. lockcard
  240. push card
  241. get id of this bkgnd
  242. if it <> "2295" then go to bkgnd id 2295
  243. send btnScript to field "BS"
  244. pop card
  245. end btnScript
  246.  
  247. on bomb
  248. put the name of target into temp
  249. put 3 into count
  250. repeat with i = 4210 to 4214
  251. play count
  252. wait until the sound is "done"
  253. wait 10
  254. set icon of temp to i
  255. if count = 0 then Flash 2
  256. subtract 1 from count
  257. end repeat
  258. end bomb
  259.  
  260. on Bye
  261. repeat 2
  262. set icon of Card btn "Bye" to 4019
  263. set icon of Card btn "Bye"to 4018
  264. end repeat
  265. end Bye
  266.  
  267. on cardScript
  268. lockcard
  269. push card
  270. get id of this bkgnd
  271. if it <> "2295" then go to bkgnd id 2295
  272. send cardScript to field "BS"
  273. pop card
  274. end cardScript
  275.  
  276. on closeCard
  277. global Start
  278. add 1 to Start
  279. pass closeCard
  280. end closeCard
  281.  
  282. on closing
  283. global SaveLevel, menu1, menu2
  284. hideSome
  285. put DeleteMenu(menu1) into menu1
  286. put DeleteMenu(menu2) into menu2
  287. end closing
  288.  
  289. on congrat
  290. push card
  291. lockcard
  292. set lockRecent to true
  293. go card "the box card"
  294. repeat with i = 1 to 5
  295. hide card field i
  296. end repeat
  297. hideAll
  298. show card field id 2
  299. set icon of btn id 1 to 6181
  300. unlockcard
  301. wait until the mouseClick
  302. play "Static"
  303. lockcard
  304. hide card field id 2
  305. pop card
  306. show menuBar
  307. end congrat
  308.  
  309. on crash
  310. push card
  311. lockcard
  312. set lockRecent to true
  313. go to first card
  314. repeat with i = 6 down to 2
  315. hide btn id i
  316. end repeat
  317. hideAll
  318. set icon of btn id 1 to 4214
  319. unlockcard
  320. send mouseUp to btn id 1
  321. lockcard
  322. repeat with i = 2 to 6
  323. show btn id i
  324. end repeat
  325. pop card
  326. show menuBar
  327. end Crash
  328.  
  329. on credits
  330. go card "the stack starter"
  331. send mouseUp to btn "Credits"
  332. end credits
  333.  
  334. on curse
  335. play "Yeow"
  336. set icon of btn "Ninja" to 4160
  337. set icon of btn "Ninja" to 4161
  338. play "Crunch"
  339. set the cursor to -1
  340. set icon of btn "Ninja" to 4137
  341. play "Evil Laugh"
  342. wait 5 secs
  343. end curse
  344.  
  345. on cursors
  346. put "Click the mouse to select cursor."
  347. put empty into cursorid
  348. repeat with i = 0 to 88
  349. set cursor to i
  350. wait 10
  351. if the mouseClick is true then exit repeat
  352. wait for 20 ticks
  353. if cursorid is 89 then exit cursors
  354. end repeat
  355. subtract 1 from i
  356. put "Set the cursor to" && i
  357. do msg
  358. wait 5 secs
  359. end cursors
  360.  
  361. on danger
  362. push card
  363. lockcard
  364. set lockRecent to true
  365. go card "the box card"
  366. repeat with i = 1 to 5
  367. hide card field i
  368. end repeat
  369. hideAll
  370. show card field id 6
  371. set icon of btn id 1 to 6181
  372. unlockcard
  373. wait until the mouseClick
  374. play "Crashbang"
  375. lockcard
  376. hide card field  id 6
  377. pop card
  378. show menuBar
  379. end Danger
  380.  
  381. on dedications
  382. go card "the stack starter"
  383. send mouseUp to btn "dedications"
  384. end dedications
  385.  
  386. on deleteButton
  387. global BypassBtnMsg, DontAsk
  388. if DontAsk is empty then
  389. answer "Do you REALLY want to delete that button?"¬¨
  390. with "Don't Ask" or "Cancel" or "Yes"
  391. if it is "Don't Ask" then put it into DontAsk
  392. else if it is "Cancel" then
  393. put BypassBtnMsg into temp
  394. put "something" into BypassBtnMsg
  395. doMenu "Copy Button"
  396. doMenu "Paste Button"
  397. put temp into BypassBtnMsg
  398. else pass deleteButton
  399. end if
  400. end deleteButton
  401.  
  402. on deleteField
  403. global StopAsk, BypassFieldMsg
  404. if StopAsk is empty then
  405. answer "Do you Really want to delete that field?"¬¨
  406. with "Don't Ask" or "Cancel" or "Yes"
  407. if it is "Don't Ask" then put it into StopAsk
  408. else if it is "Cancel" then
  409. put BypassFieldMsg into temp
  410. put "something" into BypassFieldMsg
  411. doMenu "Copy Field"
  412. doMenu "Paste Field"
  413. put temp into BypassFieldMsg
  414. else pass deleteField
  415. end if
  416. end deleteField
  417.  
  418. on deprotect1
  419. lockcard
  420. push card
  421. get id of this bkgnd
  422. if it <> "2295" then go to bkgnd id 2295
  423. send deprotect1 to field "BS"
  424. pop card
  425. end deprotect1
  426.  
  427. on ding
  428. push card
  429. lockcard
  430. set lockRecent to true
  431. go card "the box card"
  432. repeat with i = 1 to 5
  433. hide card field i
  434. end repeat
  435. hideAll
  436. show card field id 7
  437. set icon of btn id 1 to 6182
  438. unlockcard
  439. wait until the mouseClick
  440. play "Static"
  441. lockcard
  442. hide card field id 7
  443. pop card
  444. show menuBar
  445. end ding
  446.  
  447. on diskSpaceAvail
  448. put the diskSpace / 1024 && "K available on this disk"
  449. wait 120
  450. hide msg
  451. end diskSpaceAvail
  452.  
  453. on egress
  454. global SaveLevel
  455. hideSome
  456. goodbye
  457. lockcard
  458. if the short name of this stack contains "Stack Starter" then
  459. getready
  460. exit egress
  461. else put "It's a good idea to show the date or revision number"
  462. answer " Would you like to modify stack name?"¬¨
  463. with "Yes" or "No"
  464. if it is "No" then
  465. hide msg
  466. getready
  467. exit egress
  468. else if it is "Yes" then
  469. ask "Modify stack name" && quote & the short name of this stack¬¨
  470. & quote && "to...?"¬¨
  471. with the short name of this stack && bkgnd btn "Date"
  472. put it into temp
  473. set name of this stack to (temp)
  474. end if
  475. hide msg
  476. set userLevel to SaveLevel
  477. getready
  478. end egress
  479.  
  480. on enterKey --                     Toggle Tools With Enter Key
  481. if the tool = "Browse Tool"
  482. then
  483. if the optionkey is down
  484. then choose field tool
  485. else choose button tool
  486. else
  487. if the tool = "Button Tool"
  488. then
  489. if the optionkey is down¬¨
  490. then choose browse tool
  491. else choose Field Tool
  492. else
  493. if the tool = "Field Tool"
  494. then
  495. if the optionkey is down
  496. then choose button tool
  497. else choose Browse tool
  498. else
  499. choose Browse tool
  500. end if
  501. end if
  502. end if
  503. end EnterKey
  504.  
  505. on Eye this
  506. if this is "Blink" then set icon of btn "Eye" to 4038
  507. else if this is "C" then set icon of btn "Eye" to 4033
  508. else if this is "D" then set icon of btn "Eye" to 4037
  509. else if this is "L" then set icon of btn "Eye" to 4034
  510. else if this is "R" then set icon of btn "Eye" to 4036
  511. else if this is "U" then set icon of btn "Eye" to 4035
  512. end Eye
  513.  
  514. on fieldScript
  515. lockcard
  516. push card
  517. get id of this bkgnd
  518. if it <> "2295" then go to bkgnd id 2295
  519. send fieldScript to field "BS"
  520. pop card
  521. end fieldScript
  522.  
  523. on freeSpace
  524. set the numberFormat to "0.00"
  525. put (the freeSize of this stack/ 1024) && "K" into FS
  526. put FS && " of free space left over from deleting objects in"¬¨
  527. && the short name of this stack
  528. if FS is "0.00 K" then
  529. else if the diskSpace < 805000 then
  530. put "Not enough space on this disk to compact"
  531. else
  532. answer "Would you like to compact away this" && FS & "?"¬¨
  533. with "No" or "Yes"
  534. if it is "Yes" then
  535. put "Reclaiming" && FS && "of free space for you to use."
  536. doMenu "Compact Stack"
  537. beep 2
  538. put (the freeSize of this stack/ 1024) && "K" into FS
  539. put FS && " of free space in" && the short name of this stack
  540. end if
  541. end if
  542. wait 2 secs
  543. hide msg
  544. send mouseUp to field "FreeSpaceMon2"
  545. end freeSpace
  546.  
  547. on FreeSpaceMon
  548. lockcard
  549. set visible of field "FreeSpaceMon1" to¬¨
  550. not visible of field "FreeSpaceMon1"
  551. if visible of field "FreeSpaceMon1" is true then
  552. put "Free Space:" into field "FreeSpaceMon1"
  553. show field "FreeSpaceMon2"
  554. show bkgnd btn "FreeSpaceMon"
  555. set hilite of bkgnd btn "FreeSpaceMon" to true
  556. FreeSpaceMon1
  557. else
  558. hide field "FreeSpaceMon2"
  559. hide bkgnd btn "FreeSpaceMon"
  560. end if
  561. end FreeSpaceMon
  562.  
  563. on FreeSpaceMon1
  564. set the numberFormat to "0.00"
  565. put (the freeSize of this stack/1024) && "K" into field "FreeSpaceMon2"
  566. end FreeSpaceMon1
  567.  
  568. on getready
  569. lock
  570. repeat with i = 3 to 6
  571. hide btn id i
  572. end repeat
  573. end getready
  574.  
  575. on getSpecs
  576. lockcard
  577. push card
  578. get id of this bkgnd
  579. if it <> "2295" then go to bkgnd id 2295
  580. send getSpecs to field "BS"
  581. pop card
  582. end getSpecs
  583.  
  584. on getSpecsFirst
  585. lockcard
  586. push card
  587. get id of this bkgnd
  588. if it <> "2295" then go to bkgnd id 2295
  589. send getSpecsFirst to field "BS"
  590. pop card
  591. end getSpecsFirst
  592.  
  593. on getWithIt
  594. lockcard
  595. get the time
  596. answer "The time is " & it
  597. choose select tool
  598. choose browse tool
  599. end getWithIt
  600.  
  601. on goodbye
  602. set lockMessages to True
  603. go to first card
  604. repeat with i = 3 to 5
  605. show btn id i
  606. end repeat
  607. hide btn id 6
  608. send mouseUp to btn id 4
  609. show btn id 6
  610. end goodbye
  611.  
  612. on heapSpaceAvail
  613. put the heapSpace / 1024 && "K is remains currently available in application heapspace."
  614. wait 120
  615. hide msg
  616. end heapSpaceAvail
  617.  
  618. on help
  619. egress
  620. closeStack
  621. pass help
  622. end help
  623.  
  624. on hideall
  625. hide menuBar
  626. hide msg
  627. hide tool window
  628. hide pattern window
  629. end hideall
  630.  
  631. on hideSome
  632. hide msg
  633. hide tool window
  634. hide pattern window
  635. end hideSome
  636.  
  637. on home
  638. egress
  639. closeStack
  640. pass home
  641. end home
  642.  
  643. on homeScript
  644. set cursor to 4
  645. lockcard
  646. edit script of stack "Home"
  647. pop card
  648. end homeScript
  649.  
  650. on HyperCardVersion
  651. get the version
  652. if it is "1.0" then
  653. put "1.01" into it
  654. end if
  655. put "The HyperCard version you are currently using is" && it
  656. wait 2 secs
  657. hide msg
  658. end HyperCardVersion
  659.  
  660. on HyperEditOn
  661. global hyperedittemp, DontAsk, StopAsk, BypassBtnMsg, BypassFieldMsg
  662. put 1 into BypassBtnMsg
  663. put 1 into BypassFieldMsg
  664. put 1 into DontAsk
  665. put 1 into StopAsk
  666. end HyperEditOn
  667.  
  668. on HyperEditOff
  669. global hyperedittemp, DontAsk, StopAsk, BypassBtnMsg, BypassFieldMsg
  670. lockcard
  671. put empty into BypassBtnMsg
  672. put empty into BypassFieldMsg
  673. put empty into DontAsk
  674. put empty into StopAsk
  675. end HyperEditOff
  676.  
  677. on index
  678. put the name of target into temp  -- because btns are bkgnd & card
  679. repeat with iconid = 4178 to 4179
  680. set icon of temp to iconid
  681. play "Click"
  682. end repeat
  683. go to card id 12388
  684. end index
  685.  
  686. on info
  687. put word 1 to 2 of name of the target && the id of target into temp
  688. if icon of temp <> 0 then
  689. repeat with iconid = 4180 to 4188
  690. set icon of temp to iconid
  691. end repeat
  692. end if
  693. answer "Sorry, but this feature not yet supported."
  694. end info
  695.  
  696. on installHomeCardIcon
  697. lockcard
  698. push card
  699. get id of this bkgnd
  700. if it <> "2295" then go to bkgnd id 2295
  701. send installHomeCardIcon to field "BS"
  702. pop card
  703. end installHomeCardIcon
  704.  
  705. on intro
  706. global Break
  707. hideall
  708. set lockRecent to True
  709. set lockMessages to True
  710. go to first card
  711. show btn id 6
  712. repeat with i = 2 to 8
  713. if i is 2 then visual scroll down
  714. else if i is 3 then visual dissolve slow
  715. else if i is 4 then visual wipe down slow
  716. else if i is 5 then visual barn door open slow
  717. else if i is 6 then visual barn door close slow
  718. else if i is 7 then visual wipe right slow
  719. else if i is 8 then visual wipe left slow
  720. go to card i
  721. introInterupt
  722. if Break <> empty then exit intro
  723. end repeat
  724. go to ninth card
  725. play "Click"
  726. wait until the sound is "done"
  727. go to tenth card
  728. play "Click"
  729. wait until the sound is "done"
  730. go to ninth card
  731. play "Click"
  732. wait until the sound is "done"
  733. introInterupt
  734. if Break <> empty then exit intro
  735. repeat with i = 1 to 8
  736. if i is 1 then
  737. visual dissolve slow
  738. go to eighth card
  739. else if i is 2 then
  740. visual venetian blinds
  741. go to sixth card
  742. else if i is 3 then
  743. visual dissolve slow
  744. go to first card
  745. end if
  746. introInterupt
  747. if Break <> empty then exit intro
  748. end repeat
  749. end intro
  750.  
  751. on introInterupt
  752. global introComplete, Break
  753. if the mouseClick is true then
  754. if introComplete is empty then
  755. put "card" && quote & "the stack starter" & quote into introComplete
  756. end if
  757. set lockMessages to false
  758. visual dissolve slow to black
  759. visual dissolve slow
  760. go to introComplete
  761. show menubar
  762. put 1 into Break
  763. end if
  764. end introInterupt
  765.  
  766. on LNPC
  767. lock
  768. set visible of bkgnd btn id 72 to not visible of bkgnd btn id 72
  769. if visible of bkgnd btn id 72 is true then
  770. show bkgnd btn id 73
  771. show field id 78
  772. show field id 79
  773. else
  774. hide bkgnd btn id 73
  775. hide field id 78
  776. hide field id 79
  777. end if
  778. end LNPC
  779.  
  780. on lock
  781. set lockscreen to true
  782. end lock
  783.  
  784. on lockcard
  785. set lockscreen to true
  786. set lockmessages to true
  787. set lockrecent to true
  788. end lockcard
  789.  
  790. on makeMenus
  791. global menu1, menu2
  792. put NewMenu("Editors","Script of Button...","Script of Field..."¬¨
  793. ,"Script of Card...","Script of Bkgnd...","Script of Stack..."¬¨
  794. ,"Script of Home","-","DeProtect Stack","HyperEdit","HyperSound‚Ñ¢"¬¨
  795. ,"Make Icons","ResCopy","ResEdit","SoundEdit‚Ñ¢")into menu1
  796. put NewMenu("Misc.","Attention","Congratulations","Crash","Danger","Ding",¬¨
  797. "OverLoad","Panic","Pause","Vacation")into menu2
  798. end makeMenus
  799.  
  800. on map
  801. if icon of target > 0 then
  802. put the name of target into me
  803. repeat with i = 4178 to 4179
  804. set icon of me to i
  805. play "Click"
  806. end repeat
  807. end if
  808. go card "the master map"
  809. end map
  810.  
  811. on mouseEnter
  812. global TargetEnter, NewBtn, NewBtnid, NewBtnN
  813. if TargetEnter <> empty then
  814. wait 30
  815. put the short name of the target into NewBtn
  816. put the target into NewBtnN
  817. put the id of the target into NewBtnid
  818. put "Change font of " & NewBtnN
  819. if word 2 of NewBtnN <> "Button" then exit mouseEnter
  820. tabKey
  821. else pass mouseEnter
  822. end mouseEnter
  823.  
  824. on mouseLeave
  825. global TargetName
  826. put "" into targetName
  827. pass mouseLeave
  828. end mouseLeave
  829.  
  830. on mouseLocation
  831. lockcard
  832. set visible of field "Mouse Loc1" to¬¨
  833. not visible of field "Mouse Loc1"
  834. if visible of field "Mouse Loc1" is true then
  835. put "Mouse Location:" into field "Mouse Loc1"
  836. show field "Mouse Loc2"
  837. show bkgnd btn "Mouse Loc"
  838. set hilite of bkgnd btn "Mouse Loc" to true
  839. else
  840. hide field "Mouse Loc2"
  841. hide bkgnd btn "Mouse Loc"
  842. end if
  843. end mouseLocation
  844.  
  845. on mouseUp
  846. global ActiveField
  847. hide msg
  848. put empty into ActiveField
  849. if visible of field "FreeSpaceMon1" is true then FreeSpaceMon1
  850. pass mouseUp
  851. end mouseUp
  852.  
  853. on mouseWithin
  854. global TargetName
  855. put word 1 to 2 of name of target &&¬¨
  856. "id" && id of target into targetName
  857. pass mouseWithin
  858. end mouseWithin
  859.  
  860. on tabKey
  861. global TargetName, saveLevel
  862. if the optionKey is up and the shiftKey is down¬¨
  863. and the commandKey is up then
  864. put the userLevel into saveLevel
  865. set lockScreen to true
  866. set userLevel to 4
  867. set cursor to 4
  868. if targetName = "" then
  869. choose text tool
  870. doMenu "Text Style..."
  871. if saveLevel > 2 then set the userLevel to saveLevel
  872. else set the userLevel to 3
  873. exit tabKey
  874. end if
  875. if word 2 of targetName = "Button" then
  876. if showName of targetName is false then
  877. answer "The button title is turned off on this button."¬¨
  878. with "Show Title" or "Cancel"
  879. if it is "Show Title" then set showName of targetName to true
  880. else set the userLevel to saveLevel
  881. exit tabKey
  882. end if
  883. if icon of targetName <> 0 then
  884. answer "You can't change fonts on a btn with an icon."¬¨
  885. with "Remove Icon" or "Cancel"
  886. if it is "Remove Icon" then set icon of targetName to 0
  887. else set the userLevel to saveLevel
  888. exit tabKey
  889. end if
  890. end if
  891. choose text tool
  892. put the textAlign into defaultTextAlign
  893. put the textFont into defaultTextFont
  894. put the textHeight into defaultTextHeight
  895. put the textSize into defaultTextSize
  896. do ("put the textStyle into defaultTextStyle")
  897. choose Browse tool
  898. set the textAlign to (the textAlign of targetName)
  899. set the textFont to (the textFont of targetName)
  900. set the textHeight to (the textHeight of targetName)
  901. set the textSize to (the textSize of targetName)
  902. do ("set the textStyle to" && (the textStyle of targetName))
  903. choose text tool
  904. doMenu "Text Style..."
  905. choose browse tool
  906. set the textAlign of targetName to the textAlign
  907. set the textFont of targetName to the textFont
  908. set the textHeight of targetName to the textHeight
  909. set the textSize of targetName to the textSize
  910. do ("set the textStyle of" && targetName && "to" && the textStyle)
  911. choose text tool
  912. set the textAlign to defaultTextAlign
  913. set the textFont to defaultTextFont
  914. set the textHeight to defaultTextHeight
  915. set the textSize to defaultTextSize
  916. do ("set the textStyle to" && defaultTextStyle)
  917. choose browse tool
  918. set the userLevel to saveLevel
  919. set lockScreen to false
  920. else pass tabKey
  921. end tabKey
  922.  
  923. function LineClicked
  924. return (trunc((the scroll of the target / the textHeight of the target)¬¨
  925. + (((the mouseV - item 2 of the rect of the target)¬¨
  926. div the textHeight of the target) +1)))
  927. end LineClicked
  928.  
  929. on newbutton
  930. global BypassBtnMsg, NewBtn, NewBtnId, NewBtnN
  931. if BypassBtnMsg is empty then
  932. ask "How far forward should this button be?" with¬¨
  933. (the number of the target)
  934. if it > the number of the target then
  935. ask "The number must be equal or lower than" with¬¨
  936. (the number of the target)
  937. end if
  938. if it is empty then put (the number of the target) into it
  939. put it into newnum
  940. set the cursor to 4
  941. lockcard
  942. if newnum < the number of the target then
  943. repeat until the number of the target is newnum
  944. type "-" with commandkey
  945. end repeat
  946. end if
  947. if the optionkey is up and the commandKey is down then
  948. put the target into NewBtnN
  949. set autoHilite of NewBtnN to true
  950. set style of NewBtnN to rectangle
  951. doMenu "Button Info..."
  952. put the short name of NewBtnN into NewBtn
  953. put the name of NewBtnN into NewBtnN
  954. put word 1 of NewBtnN && "btn id" && id of NewBtnN into NewBtnId
  955. choose browse tool
  956. tabKey
  957. end if
  958. end if
  959. end newbutton
  960.  
  961. on newfield
  962. global BypassFieldMsg
  963. if BypassFieldMsg is empty then
  964. ask "How far forward should this field be?" with¬¨
  965. (the number of the target)
  966. if it > the number of the target then
  967. ask "The number must be equal or lower than" with¬¨
  968. (the number of the target)
  969. end if
  970. if it is empty then put (the number of the target) into it
  971. put it into newnum
  972. set the cursor to 4
  973. lockcard
  974. if newnum < the number of the target then
  975. repeat until the number of the target is newnum
  976. type "-" with commandkey --- or, domenu "Send farther"
  977. end repeat
  978. end if
  979. if the commandkey is down and the optionkey is up then
  980. set the style of the target to rectangle
  981. tabKey
  982. domenu field info...
  983. end if
  984. end if
  985. end newfield
  986.  
  987. on Ninja what
  988. if what is "Blink" then set icon of btn "Ninja" to 4145
  989. else if what is "C" then set icon of btn "Ninja" to 4137
  990. else if what is "D" then set icon of btn "Ninja" to 4141
  991. else if what is "L" then set icon of btn "Ninja" to 4138
  992. else if what is "R" then set icon of btn "Ninja" to 4140
  993. else if what is "U" then set icon of btn "Ninja" to 4139
  994. else if what is "winkR" then
  995. set icon of btn "Ninja" to 4143
  996. curse
  997. else if what is "winkL" then
  998. set icon of btn "Ninja" to 4144
  999. curse
  1000. end if
  1001. end Ninja
  1002.  
  1003. on openApl
  1004. ask "Open what non-HyperCard document?" with¬¨
  1005. "Type name of document to be opened here"
  1006. if it is empty then exit openApl
  1007. put it into doc
  1008. ask "What application does this document require" with¬¨
  1009. "Type the name of the program here."
  1010. if it is empty then exit openApl
  1011. put it into apl
  1012. open doc with apl
  1013. end openApl
  1014.  
  1015. on openCard
  1016. hideSome
  1017. push card
  1018. if the userlevel < 5 then set the userlevel to 5
  1019. pass openCard
  1020. end openCard
  1021.  
  1022. on openField
  1023. global ActiveField
  1024. put name of target into ActiveField
  1025. end openField
  1026.  
  1027. on closeField
  1028. global ActiveField
  1029. put empty into ActiveField
  1030. end closeField
  1031.  
  1032. on overLoad
  1033. play "Static"
  1034. hide menuBar
  1035. push card
  1036. visual dissolve to black
  1037. play "Static"
  1038. wait until the sound is "done"
  1039. go to first card
  1040. beep
  1041. Answer "Stack Overload!  Erase Current Disk?" with "Yes" or "No" or "Cancel"
  1042. if it <> "Yes" then answer "                       Too Late." with Sorry
  1043. play "Evil Laugh"
  1044. answer "                      Just kidding."
  1045. visual dissolve to black
  1046. pop card
  1047. show menuBar
  1048. end overLoad
  1049.  
  1050. on panic
  1051. set lockMessages to true
  1052. hideAll
  1053. set lockRecent to true
  1054. go to card "Panic Spredsheet"
  1055. wait until the mouseClick
  1056. pop card
  1057. show menuBar
  1058. end panic
  1059.  
  1060. on pause
  1061. global Break, introComplete
  1062. put empty into Break
  1063. put id of this card into introComplete
  1064. repeat until the mouseClick
  1065. if Break <> empty then exit pause
  1066. Intro
  1067. end repeat
  1068. set lockMessages to false
  1069. visual effect dissolve slow
  1070. go introComplete
  1071. show menubar
  1072. end pause
  1073.  
  1074. on piGrid
  1075. set visible of bkgnd btn "Grid Cover" to¬¨
  1076. not visible of bkgnd btn "Grid Cover"
  1077. end piGrid
  1078.  
  1079. on ScriptHeader
  1080. lockcard
  1081. push card
  1082. get id of this bkgnd
  1083. if it <> "2295" then go to bkgnd id 2295
  1084. send ScriptHeader to field "BS"
  1085. pop card
  1086. end ScriptHeader
  1087.  
  1088. on scroll this
  1089. if this is "D" then
  1090. visual scroll down very fast to gray
  1091. visual scroll down very fast
  1092. else if this is "L" then
  1093. visual scroll left very fast to gray
  1094. visual scroll left very fast
  1095. else if this is "R" then
  1096. visual scroll right very fast to gray
  1097. visual scroll right very fast
  1098. else if this is "U" then
  1099. visual scroll up very fast to gray
  1100. visual scroll up very fast
  1101. end if
  1102. end scroll
  1103.  
  1104. on ShowHiddenBtns
  1105. lockcard
  1106. push card
  1107. get id of this bkgnd
  1108. if it <> "2295" then go to bkgnd id 2295
  1109. send ShowHiddenBtns to field "BS"
  1110. pop card
  1111. end ShowHiddenBtns
  1112.  
  1113. on ShowHiddenFields
  1114. lockcard
  1115. push card
  1116. get id of this bkgnd
  1117. if it <> "2295" then go to bkgnd id 2295
  1118. send ShowHiddenFields to field "BS"
  1119. pop card
  1120. end ShowHiddenFields
  1121.  
  1122. on SizeofStack
  1123. answer "Sorry, but this feature is not available yet."
  1124. end SizeofStack
  1125.  
  1126. on skull
  1127. put the name of target into temp
  1128. put 0 into count
  1129. repeat 3
  1130. if count < 2 then play "Evil Laugh"
  1131. set icon of temp to 4114
  1132. set icon of temp to 4113
  1133. add 1 to count
  1134. end repeat
  1135. end skull
  1136.  
  1137. on stackScript
  1138. put filename("STAK") into fname
  1139. if fname is empty then exit stackScript
  1140. push card
  1141. set cursor to 4
  1142. lockcard
  1143. edit script of stack fname
  1144. pop card
  1145. end stackScript
  1146.  
  1147. on stackSpaceAvail
  1148. put the stackSpace / 1024 &&¬¨
  1149. "K remains available in the Macintosh operating system stack."
  1150. wait 120
  1151. hide msg
  1152. end stackSpaceAvail
  1153.  
  1154. on StartDown
  1155. if the short name of this stack contains "Stack Starter" then
  1156. answer "Be safe, work with a copy of this stack."¬¨
  1157. with "Just Looking" or "OK Copy It"
  1158. if it is "OK Copy It" then
  1159. doMenu "Save a Copy..."
  1160. end if
  1161. end if
  1162. show btn id 6
  1163. end StartDown
  1164.  
  1165. on OsErr err
  1166. lockcard
  1167. push card
  1168. get id of this bkgnd
  1169. if it <> "2295" then go to bkgnd id 2295
  1170. send OsErr to field "BS"
  1171. pop card
  1172. end OsErr
  1173.  
  1174. on timeDate
  1175. put the time && the long date
  1176. wait 2 secs
  1177. hide msg
  1178. end timeDate
  1179.  
  1180. on updated
  1181. lockcard
  1182. push card
  1183. get id of this bkgnd
  1184. if it <> "2295" then go to bkgnd id 2295
  1185. send updated to field "BS"
  1186. pop card
  1187. end updated
  1188.  
  1189. on unlock
  1190. set lockscreen to false
  1191. end unlock
  1192.  
  1193. on unlockcard
  1194. set lockscreen to false
  1195. set lockmessages to false
  1196. set lockrecent to false
  1197. end unlockcard
  1198.  
  1199. on vacat
  1200. push card
  1201. lockcard
  1202. set lockRecent to true
  1203. go card "the box card"
  1204. repeat with i = 1 to 5
  1205. hide card field i
  1206. end repeat
  1207. hideAll
  1208. show card field id 4
  1209. set icon of btn id 1 to 6182
  1210. unlockcard
  1211. wait until the mouseClick
  1212. lockcard
  1213. hide card field id 4
  1214. pop card
  1215. show menuBar
  1216. end vacat
  1217.  
  1218. on getLinNum
  1219. global LN, LNS
  1220. put textHeight of the target into lineHght
  1221. if wideMargins of target is true then
  1222. put lineHght/3 into WM
  1223. else put 0 into WM
  1224. put (((item 2 of the clickLoc)-(item 2 of the rect of target+ WM))¬¨
  1225. /lineHght)+1 into A
  1226. put trunc(A) into LN
  1227. put (the scroll of the target / lineHght) into B
  1228. --if E > number of lines of target then put "0" into E
  1229. put trunc(A + B) into LNS
  1230. end getLinNum
  1231.  
  1232. on returnkey
  1233. if the shiftkey is down and the optionkey is down then
  1234. HyperEditOn
  1235. hyperedit the name of this card
  1236. HyperEditOff
  1237. else if the optionkey is down